package com.example.dllo.Activity;


import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class Splash_Judge_Activity extends Activity {
    private SharedPreferences sharedPreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        sharedPreferences = getSharedPreferences("count", MODE_WORLD_READABLE);
        int count = sharedPreferences.getInt("count",0);

        if (count == 0){
            Intent intent = new Intent(getApplicationContext(),Welcome_Activity.class);
            startActivity(intent);
            SharedPreferences.Editor editor = sharedPreferences.edit();
            //存入数据
            editor.putInt("count",++count);
            //提交数据
            editor.commit();
        }
        else {
            Intent intent = new Intent(Splash_Judge_Activity.this,Splash_Activity.class);
            startActivity(intent);
            Splash_Judge_Activity.this.finish();

        }

    }
}
